package yesjava;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main2 {
    public static void main(String[] args) throws ParseException {
       /* String str = "8954";
        int i = Integer.parseInt(str);*/
        String birthday = "2000-10-14 17:40:09";
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = dateFormat.parse(birthday);//通过字符串直接解释成 日期对象
        long time = date.getTime();
        System.out.println((System.currentTimeMillis() - time)/1000/3600/24);
    }
}
